infix (|), infix ∪
1 | language documentation Sets, bags, and mixes |
1.1 | (Sets, bags, and mixes) infix (|), infix ∪ |
2 | language documentation Operators |
2.1 | (Operators) infix (|), infix ∪ |
Documentation for infix (|), infix ∪
assembled from the following types:
language documentation Sets, bags, and mixes
(Sets, bags, and mixes) infix (|), infix ∪
Returns the union of all its arguments. More information, Wikipedia definition.
language documentation Operators
From Operators
(Operators) infix (|), infix ∪
multi sub infix:<(|)>(**)multi sub infix:<∪>(**)
Returns the union of all of its arguments. This creates a new Set that contains all the elements its arguments contain if none of the arguments are a Bag, BagHash, Mix or MixHash.
say <a b d> ∪ bag(<a a b c>); # OUTPUT: «Bag(a(2), b, c, d)»
If any of the arguments are Baggy or Mixy>, the result is a new Bag
(or Mix
) containing all the elements, each weighted by the highest weight that appeared for that element.
say <a b d> ∪ bag(<a a b c>); # OUTPUT: «Bag(a(2), b, c, d)»
∪
is equivalent to (|)
, at codepoint U+222A (UNION).